<?php
namespace bee;

class afterWhere
{
  private $text;
  private $param              = array();
  private $paramType          = array();

  function __construct($text = "", array $params = array(), array $paramTypes = array())
  {
    $this->text               = $text;
    $this->setParams($params, $paramTypes);
  }

  function setParam($name, $value, $type = \PDO::PARAM_INT)
  {
    $this->param[$name]       = $value;
    $this->paramType[$name]   = $type;
  }
  function setParams(array $params = array(), array $types = array())
  {
    foreach($params as $key => $value)
    {
      $this->param[$key] = $value;
      if(isset($types[$key]))
      {
        $this->paramType[$key] = $types[$key];
      }
    }
  }

  public function getText()
  {
  	return $this->text;
  }
}
